home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / misc / installer / examples / processes.installer < prev    next >
Text File  |  1999-06-15  |  2KB  |  69 lines

  1.  
  2. (set #startcount 100)
  3.  
  4. (user expert)
  5. (message "\n\nThis is a small performance test :)\n\n"
  6.          "There are 4 WHILE loops, all counting from " #startcount "\n"
  7.          "down to 0. One time this will be done concurrently\n"
  8.          "(for every WHILE one process) and then these WHILE\n"
  9.          "loops running one after the other...\n"
  10.          "Let`s see, what is faster!"
  11. )
  12.  
  13. ; *******************************************************************
  14.  
  15. (message "Now trying CONCURRENT-DO")
  16. (working "\nPlease be patient - this will take some time.")
  17.  
  18. (set #before1 (database "time"))
  19. (concurrent-do (
  20.                  (set i #startcount)
  21.                  (while i (set i (- i 1)))
  22.                )
  23.                (
  24.                  (set j #startcount)
  25.                  (while j (set j (- j 1)))
  26.                )
  27.                (
  28.                  (set k #startcount)
  29.                  (while k (set k (- k 1)))
  30.                )
  31.                (
  32.                  (set l #startcount)
  33.                  (while l (set l (- l 1)))
  34.                )
  35. )
  36. (set #after1 (database "time"))
  37.  
  38. ; *******************************************************************
  39.  
  40. (message "And now the good old sequence")
  41. (working "\nPlease be patient - this will take some time.")
  42.  
  43. (set #before2 (database "time"))
  44. (
  45.   (set i #startcount)
  46.   (while i (set i (- i 1)))
  47. )
  48. (
  49.   (set j #startcount)
  50.   (while j (set j (- j 1)))
  51. )
  52. (
  53.   (set k #startcount)
  54.   (while k (set k (- k 1)))
  55. )
  56. (
  57.   (set l #startcount)
  58.   (while l (set l (- l 1)))
  59. )
  60. (set #after2 (database "time"))
  61.  
  62. ; *******************************************************************
  63.  
  64. (exit "\nDone...\n\n"
  65.       ("concurrent: %s - %s\nsequencial: %s - %s" #before1 #after1 #before2 #after2)
  66.       (quiet)
  67. )
  68. (welcome)
  69.